package com.fantastic.controller;

import com.fantastic.anno.ResubmitCheck;
import com.fantastic.dtos.req.RedissonReq;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : fantastic
 * @date : 2024/5/17 16:13
 * @desc : this class for Resubmit测试
 **/
@RestController
@RequestMapping("/learn/resubmit")
@AllArgsConstructor
public class ResubmitController {
    /**
     * Resubmit测试方法一
     * @param req
     */
    @PostMapping("/test")
    @ResubmitCheck(expire = 2)
    public String redissonTest(@RequestBody RedissonReq req){
        System.out.println("测试系统");
        return "200";
    }
}
